package com.tledu.service.impl;

import com.tledu.dao.DepartmentDao;
import com.tledu.model.Department;
import com.tledu.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    private DepartmentDao departmentDao;
    @Override
    public List<Department> list() {
        return departmentDao.list();
    }

    @Override
    public int insert(Department department) {
        return departmentDao.insert(department);
    }

    @Override
    public int delete(String departmentId) {
        return departmentDao.delete(departmentId);
    }

    @Override
    public int update(Department department) {
        return departmentDao.update(department);
    }

    @Override
    public Department selectById(String departmentId) {
        return departmentDao.selectById(departmentId);
    }
}
